package com.ym.b2b.ws.service.impl;

import java.util.ArrayList;
import java.util.List;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;

import com.ym.b2b.product.dao.ProductDao;
import com.ym.b2b.product.sqlbean.EmBProduct;
import com.ym.b2b.ws.base.BaseWs;
import com.ym.b2b.ws.service.ProductWebService;

@WebService(endpointInterface = "com.ym.b2b.ws.service.ProductWebService", serviceName = "product")
public class ProductWebServiceImpl extends BaseWs implements ProductWebService {

    @Autowired
    private ProductDao productDao;

    @Override
    public List<EmBProduct> getProductListForJosn(String searchWhere) {

        logger.info("dddddd");
        return new ArrayList<EmBProduct>();
    }

    @Override
    public EmBProduct getProductDetailForJosn(String productCode) {
        EmBProduct emBProduct = new EmBProduct();
        emBProduct.setProductCode(productCode);
        emBProduct = productDao.showProductDetail(emBProduct);
        return emBProduct;
    }

    @Override
    public String hello(String text, String file) {
        return "Hello :" + text + file;
    }

}
